package com.zkthink.ceres.order.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

@Getter
public enum OrderBassTriggerStatusEnum {
    //触发状态
    // 1.订单的确认收货
    // 2.订单的分销结算完成
    // 3.订单的退款。
    // 4.订单的分销退款完成

    STATUS_1(1, "下单"),
    STATUS_2(2, "发货"),
    STATUS_3(3, "揽收"),
    STATUS_4(4, "配送"),
    STATUS_5(5, "签收");

    private int code;

    private String desc;

    OrderBassTriggerStatusEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static OrderBassTriggerStatusEnum getDscByType(Integer type) {
        for (OrderBassTriggerStatusEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
